package Vista;
import java.awt.event.ActionListener;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;
import Controlador.ControladorMenuInicio;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class VistaMenuInicio extends javax.swing.JFrame {
	private JMenuBar menBarra;
	private JMenuItem jMenuItem2;
	private JMenu jMenu2;
	private JMenu jMenu1;
	//private ControladorMenuInicio control;
	private JMenuItem jMenuItem4;
	private JMenuItem jMenuItem3;
	private JMenuItem jMenuItem1;

	/**
	* Auto-generated main method to display this JFrame
	*/
	
	public VistaMenuInicio() {
		super();
		//control = new ControladorMenuInicio(this);
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setLayout(null);
			getContentPane().setBackground(new java.awt.Color(170,215,193));
			this.setName("frame18");
			this.setTitle("Liga de Beisbol Profesional");
			this.setResizable(false);
			{
				menBarra = new JMenuBar();
				setJMenuBar(menBarra);
				menBarra.setBackground(new java.awt.Color(64,128,128));
				{
					jMenu1 = new JMenu();
					menBarra.add(jMenu1);
					jMenu1.setText("Liga");
					jMenu1.setFont(new java.awt.Font("Segoe UI",1,14));
					{
						jMenuItem1 = new JMenuItem();
						jMenu1.add(jMenuItem1);
						jMenuItem1.setText("Asignar juegos");
					}
					{
						jMenuItem3 = new JMenuItem();
						jMenu1.add(jMenuItem3);
						jMenuItem3.setText("Reiniciar liga");
					}
				}
				{
					jMenu2 = new JMenu();
					menBarra.add(jMenu2);
					jMenu2.setText("Registro");
					jMenu2.setFont(new java.awt.Font("Segoe UI",1,14));
					{
						jMenuItem2 = new JMenuItem();
						jMenu2.add(jMenuItem2);
						jMenuItem2.setText("Registrar equipo");
					}
					{
						jMenuItem4 = new JMenuItem();
						jMenu2.add(jMenuItem4);
						jMenuItem4.setText("Registrar umpire");
					}
				}
			}
			pack();
			this.setSize(481, 390);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	
	public void agregarListener(ActionListener control){
		jMenuItem1.addActionListener(control); //Asignar juegos
		jMenuItem3.addActionListener(control); //Reiniciar liga
		jMenuItem2.addActionListener(control); //Registrar equipo
		jMenuItem4.addActionListener(control); //Registrar umpire
	}

}
